package com.lv.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lv.common.dto.OrderList;
import com.lv.common.dto.OrderMain;
import com.lv.entity.Order;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lv.entity.OrderGoods;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 凉薄
 * @since 2022-01-21
 */
public interface OrderService extends IService<Order> {
    IPage<OrderList> getAllOrder(Page<?> page,String custName,String status);
    OrderMain getOrderMainById(Long id);
    @Transactional
    int saveOrder(Order order, List<OrderGoods>goods);
    @Transactional
    int removeOrder(Long id);
    @Transactional
    int updateOrder(Long id,List<OrderGoods> goods);
}
